#include "trap.h"
    .set noreorder
    .set noat 
    .global main 
    .text 

main:
    li $t0, 0xbfc0ffff
    li $t1, 0xdd064458
    sw $t1, 0x0000003c($t0) # 触发地址错误异常

#test badvaddr
    mfc0 $t2, $8
    nop

#test status
    mfc0 $t3, $12
    nop

#test cause 期待值为0x05，实际上为0x14
    mfc0 $t4, $13
    nop

#test epc
    mfc0 $t5, $14
    nop

    li $t0, 0xbfc0ffff
    li $t1, 0xdd064458
    sw $t1, 0x0000003c($t0)

    #test badvaddr
    mfc0 $t2, $8
    nop

#test status
    mfc0 $t3, $12
    nop

#test cause
    mfc0 $t4, $13
    nop

#test epc
    mfc0 $t5, $14
    nop

    HIT_GOOD_TRAP
